<script>
import { filterAttr } from '../../common/util'
import { h, resolveComponent } from 'vue'
import Body from '../../container/body/index.vue'
export default {
  name: 'NativeCom',
  components: {
    LowCodeBody: Body
  },
  props: {
    schema: {
      type: Object,
      required: true
    }
  },
  setup(props) {
    const schema = props.schema
    return () =>
      h(
        schema.type,
        {
          ...filterAttr(schema)
        },
        h(resolveComponent('LowCodeBody'), {
          body: schema.body
        })
      )
  }
}
</script>
